/*rzxqFeC1Q4Nf7h12KpqtZWnlTWdVsCYZwgWkuv5eY95rehuq+Zbg/CaSc6zrBYni*/
import { URL, STATUS, FIELD, PAGECODE } from '../../constance';

export default function editBtnClick(pageModel, record) {
    const { pageTo, updatePageStatus } = pageModel;
    const pagecode = PAGECODE.cardCode,
        appcode = pageTo.getPageContext("appcode"),
        pk = record && record[FIELD.pk] && record[FIELD.pk].value;
    updatePageStatus(STATUS.edit);
    pageTo.pushTo(URL.gotoCard, { [FIELD.id]: pk, pagecode, appcode });
}

/*rzxqFeC1Q4Nf7h12KpqtZWnlTWdVsCYZwgWkuv5eY95rehuq+Zbg/CaSc6zrBYni*/